package cn.tedu.service;

import cn.tedu.pojo.Collect;
import cn.tedu.pojo.Novel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "novel-system",contextId = "remoteService")
public interface RemoteService {

    @PutMapping("/addNovel")
    void addNovel(@RequestBody Collect collect);

    @DeleteMapping("/deleteNovel")
    void deleteNovel(@RequestParam("userId") String userId,
                     @RequestParam("novelId") String novelId);

    @GetMapping("/getNovelByUserId")
    List<Novel> getNovelByUserId(@RequestParam("userId") Integer userId);
}
